<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Doxygen manual for MemAlloc: SmartPtr&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Doxygen manual for MemAlloc
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classSmartPtr-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SmartPtr&lt; T &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>SMartPtr interface class.  
 <a href="classSmartPtr.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="memalloc_8hpp_source.html">memalloc.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5bfbe13632132eae5d0a2e757194dde5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5bfbe13632132eae5d0a2e757194dde5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmartPtr.html#a5bfbe13632132eae5d0a2e757194dde5">SmartPtr</a> ()=delete</td></tr>
<tr class="memdesc:a5bfbe13632132eae5d0a2e757194dde5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Explicitely delete default constructor. <br/></td></tr>
<tr class="separator:a5bfbe13632132eae5d0a2e757194dde5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1e7183f3213d9dcc72b1003e363ca23"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmartPtr.html#ac1e7183f3213d9dcc72b1003e363ca23">SmartPtr</a> (<a class="el" href="classSmartPtrImpl.html">SmartPtrImpl</a>&lt; T &gt; *pimpl)</td></tr>
<tr class="separator:ac1e7183f3213d9dcc72b1003e363ca23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2a9188faebd7cefd8a3be75d3e71d8a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmartPtr.html#ad2a9188faebd7cefd8a3be75d3e71d8a">SmartPtr</a> (const <a class="el" href="classSmartPtr.html">SmartPtr</a>&lt; T &gt; &amp;ptr)</td></tr>
<tr class="separator:ad2a9188faebd7cefd8a3be75d3e71d8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a894b8bfc8026d8837a43224eb3054fa9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a894b8bfc8026d8837a43224eb3054fa9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmartPtr.html#a894b8bfc8026d8837a43224eb3054fa9">~SmartPtr</a> ()</td></tr>
<tr class="memdesc:a894b8bfc8026d8837a43224eb3054fa9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simple destructor for reference counter. <br/></td></tr>
<tr class="separator:a894b8bfc8026d8837a43224eb3054fa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae375044a9b90cb0e54a952b3fb11c8dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSmartPtr.html">SmartPtr</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmartPtr.html#ae375044a9b90cb0e54a952b3fb11c8dc">operator=</a> (const <a class="el" href="classSmartPtr.html">SmartPtr</a> &amp;ptr)</td></tr>
<tr class="separator:ae375044a9b90cb0e54a952b3fb11c8dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a529b60de9c5d83d362f9ebfb702ba5cc"><td class="memItemLeft" align="right" valign="top">T &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmartPtr.html#a529b60de9c5d83d362f9ebfb702ba5cc">operator*</a> ()</td></tr>
<tr class="separator:a529b60de9c5d83d362f9ebfb702ba5cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35b7b8f5716e02c25fb1dbfacec3c0a1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35b7b8f5716e02c25fb1dbfacec3c0a1"></a>
const T &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator*</b> () const </td></tr>
<tr class="separator:a35b7b8f5716e02c25fb1dbfacec3c0a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab25ef5b89c70459529c0b037042a0314"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab25ef5b89c70459529c0b037042a0314"></a>
T *&#160;</td><td class="memItemRight" valign="bottom"><b>operator-&gt;</b> ()</td></tr>
<tr class="separator:ab25ef5b89c70459529c0b037042a0314"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e7220df28f6bb64a1ec008e7bf3a9a6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e7220df28f6bb64a1ec008e7bf3a9a6"></a>
const T *&#160;</td><td class="memItemRight" valign="bottom"><b>operator-&gt;</b> () const </td></tr>
<tr class="separator:a0e7220df28f6bb64a1ec008e7bf3a9a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d2e146cdb29ac5b366ab7a04a048340"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0d2e146cdb29ac5b366ab7a04a048340"></a>
T &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (size_t idx)</td></tr>
<tr class="separator:a0d2e146cdb29ac5b366ab7a04a048340"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa75c7600dde9b43b90c29005d189fb65"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa75c7600dde9b43b90c29005d189fb65"></a>
const T &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (size_t idx) const </td></tr>
<tr class="separator:aa75c7600dde9b43b90c29005d189fb65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:a793b6100501f7bf73ab71adbb354995c"><td class="memItemLeft" align="right" valign="top">T *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmartPtr.html#a793b6100501f7bf73ab71adbb354995c">Get</a> ()</td></tr>
<tr class="separator:a793b6100501f7bf73ab71adbb354995c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27e6ede6a13a18c161e4e10ac2446629"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27e6ede6a13a18c161e4e10ac2446629"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Release</b> ()</td></tr>
<tr class="separator:a27e6ede6a13a18c161e4e10ac2446629"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class T&gt;<br/>
class SmartPtr&lt; T &gt;</h3>

<p>SMartPtr interface class. </p>
<p>Object of this class is returned by Allocate in <a class="el" href="classMemAlloc.html" title="Memory Allocator interface class.">MemAlloc</a>. One should use <a class="el" href="classSmartPtr.html" title="SMartPtr interface class.">SmartPtr</a>'s instead of usual C pointers everywhere in his code. This will allow <a class="el" href="classMemAlloc.html" title="Memory Allocator interface class.">MemAlloc</a> to know when memory is actively used and when it may be unloaded to a swap area. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac1e7183f3213d9dcc72b1003e363ca23"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSmartPtr.html">SmartPtr</a>&lt; T &gt;::<a class="el" href="classSmartPtr.html">SmartPtr</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classSmartPtrImpl.html">SmartPtrImpl</a>&lt; T &gt; *&#160;</td>
          <td class="paramname"><em>pimpl</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor getting implementation pointer is only way to construct <a class="el" href="classSmartPtr.html" title="SMartPtr interface class.">SmartPtr</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pimpl</td><td>pointer to a realization</td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::bad_alloc</td><td>exception on out-of-memory </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad2a9188faebd7cefd8a3be75d3e71d8a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSmartPtr.html">SmartPtr</a>&lt; T &gt;::<a class="el" href="classSmartPtr.html">SmartPtr</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSmartPtr.html">SmartPtr</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>ptr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Simple copy constructor for reference counter </p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::bad_alloc</td><td>exception on out-of-memory </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a793b6100501f7bf73ab71adbb354995c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T* <a class="el" href="classSmartPtr.html">SmartPtr</a>&lt; T &gt;::Get </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Using Get/Release methods one can get usual C pointer from <a class="el" href="classSmartPtr.html" title="SMartPtr interface class.">SmartPtr</a> and lock memory for swapping until Release method called</p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::bad_alloc</td><td>exception on out-of-memory </td></tr>
    <tr><td class="paramname">std::ios_base::failure</td><td>for file error </td></tr>
    <tr><td class="paramname"><a class="el" href="classMemAllocException.html" title="General exception class for MemAlloc.">MemAllocException</a></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a529b60de9c5d83d362f9ebfb702ba5cc"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">T&amp; <a class="el" href="classSmartPtr.html">SmartPtr</a>&lt; T &gt;::operator* </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Usual smart-pointer access operators. Access may take a lot of time because of possible swapping. THeese functions may throw!</p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::bad_alloc</td><td>exception on out-of-memory </td></tr>
    <tr><td class="paramname">std::ios_base::failure</td><td>for file error </td></tr>
    <tr><td class="paramname"><a class="el" href="classMemAllocException.html" title="General exception class for MemAlloc.">MemAllocException</a></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae375044a9b90cb0e54a952b3fb11c8dc"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSmartPtr.html">SmartPtr</a>&amp; <a class="el" href="classSmartPtr.html">SmartPtr</a>&lt; T &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSmartPtr.html">SmartPtr</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>ptr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Simple operator = for reference counter </p>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::bad_alloc</td><td>exception on out-of-memory </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/home/oponomarev/workspace/parallels-ip-2014/trunk/interfaces/<a class="el" href="memalloc_8hpp_source.html">memalloc.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Apr 7 2014 12:04:10 for Doxygen manual for MemAlloc by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>
